﻿@model MatchEvent

@switch (Model.MatchEventType)
{
    case MatchEventType.Scored:
        var title = Model.Extra == null ? string.Format("Scored: {0} minutes", Model.Minute) : string.Format("Scored: {0} minutes (+{1})", Model.Minute, Model.Extra);
        <img style="vertical-align: middle; height: 15px" src="~/Content/images/goal.png" title="@title" />
        break;
                                                
    case MatchEventType.Booked:    
        title = Model.Extra == null ? string.Format("Booked: {0} minutes", Model.Minute) : string.Format("Booked: {0} minutes (+{1})", Model.Minute, Model.Extra);
        <img style="vertical-align: middle; height: 15px" src="~/Content/images/yellowcard.png" title="@title" />
        break;

    case MatchEventType.SentOff:
        title = Model.Extra == null ? string.Format("Sent off: {0} minutes", Model.Minute) : string.Format("Sent off: {0} minutes (+{1})", Model.Minute, Model.Extra);
        <img style="vertical-align: middle; height: 15px" src="~/Content/images/redcard.png" title="@title" />
        break;

    case MatchEventType.OwnGoal:
        title = Model.Extra == null ? string.Format("Own goal: {0} minutes", Model.Minute) : string.Format("Own goal: {0} minutes (+{1})", Model.Minute, Model.Extra);
        <img style="vertical-align: middle; height: 15px" src="~/Content/images/owngoal.png" title="@title" />
        break;

    case MatchEventType.BroughtOn:
        title = Model.Extra == null ? string.Format("Brought on: {0} minutes", Model.Minute) : string.Format("Brought on: {0} minutes (+{1})", Model.Minute, Model.Extra);
        <img style="vertical-align: middle; height: 15px" src="~/Content/images/substitution.png" title="@title" />
        break;
}